Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uselessOverride: Detect code duplication in overriding function #5219

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

chrchr-github
Copy link
Collaborator

No description provided.

@orbitcowboy orbitcowboy merged commit dde4545 into danmar:main Jul 5, 2023
@danmar
Copy link
Owner

danmar commented Jul 5, 2023

hmm.. in the premium addon I have such code and at first glance I feel it's intentional.

I have a ExprEngine::Value class that contains a virtual isUninit() method. The default implementation returns false.

I have a derived ExprEngine::BailoutValue class that overrides that method and returns false also. I feel I do want to explicitly return false in the BailoutValue and it's more dangerous to remove it than keeping it.

But well the alternative could maybe be to remove the base class implementation so it must be overridden. If the idea is that the base class method should be empty then it could be clarified in the message.

@chrchr-github chrchr-github deleted the chr_Fix11757_2 branch August 11, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants